package com.demo.returned_message;

import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.ExchangeBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 配置一个没有绑定任何队列的交换机
 * @author shenguangyang
 */
@Configuration
public class NotBindingConfig {
    @Bean
    public DirectExchange notBindingExchange() {
        return ExchangeBuilder.directExchange("not_binding_exchange").durable(true).build();
    }
}
